#include"pch.h"
#include <limits.h>
#include"ClassDLL.h"


MyMath<int>* _stdcall InitMyMath()
{
	MyMath<int>* pMath = new MyMath<int>;
	return pMath;

}

int _stdcall Add(MyMath<int>* pMath, const int& a, const int& b)
{
	if (pMath != NULL)
	{
		return pMath->Add(a,b);
	}
	return INT_MIN;
}

int _stdcall Substract(MyMath<int>* pMath, const int& a,const int& b)
{
	if (pMath != NULL)
	{
		return pMath->Substract(a,b);
	}
	return INT_MIN;
}

void _stdcall SortArray(MyMath<int>* pMath, int* pArr, const int& nSize)
{
	if (pMath != NULL)
	{
		return pMath->Sort(pArr, nSize);
	}
}

char* _stdcall ToString(MyMath<int>* pMath)
{
	if (pMath != NULL)
	{
		return pMath->ToString();
	}
}

void _stdcall CloseMath(MyMath<int>* pMath)
{
	if (pMath != NULL)
	{
		delete pMath;
		pMath = NULL;
	}
}